import { createRouter, createWebHistory } from 'vue-router'
import HomePage from '@/pages/HomePage.vue'
import UserLoginPage from '@/pages/UserLoginPage.vue'
import UserRegisterPage from '@/pages/UserRegisterPage.vue'
import BasicLayout from '@/layouts/BasicLayout.vue'
import InnovationActitiesPage from '@/pages/teacher/InnovationActitiesPage.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 不使用布局的页面 - 登录和注册
    {
      path: '/user/login',
      name: '用户登录',
      component: UserLoginPage,
    },
    {
      path: '/user/register',
      name: '用户注册',
      component: UserRegisterPage,
    },

    // 使用BasicLayout布局的页面

    {
      path: '/',
      component: BasicLayout,
      children: [
        // 其他需要使用布局的路由可以放在这里
        {
          path: '',
          name: 'home',
          component: HomePage,
        },
        {
          path: '/teacher/InnovationActitiesPage',
          name: '创新活动',
          component: InnovationActitiesPage,
        },
      ],
    },
  ],
})

export default router
